﻿using UnityEngine;
using System.Collections;

public class Data_Sprite : MonoBehaviour {

	public xy pos;
	public xy size;
	public Sprite sprite;
	public int layer;

	public bool showWhilePlaying = false;

	void Start () {
		SpriteRenderer r = GetComponent<SpriteRenderer> ();
		if (r != null) {
			sprite = r.sprite;
			layer = r.sortingLayerID;
		}
		pos.x = (int)transform.position.x;
		pos.y = (int)transform.position.y;
		size.x = (int)transform.lossyScale.x;
		size.y = (int)transform.lossyScale.y;		
		if (!showWhilePlaying) gameObject.SetActive (false);
	}

}
